package com.bookkeeping.bookkeepingapi.service.dto;

import com.bookkeeping.bookkeepingapi.model.User;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class UserDto {

    private Integer userId;

    private LocalDateTime addTime;

    private LocalDateTime updateTime;

    private  String username;

    private String realname;

    private Integer count;

    public UserDto(User user)
    {
        this.userId=user.getId();
        this.addTime=user.getAddTime();
        this.updateTime=user.getUpdateTime();
        this.username=user.getUsername();
        this.realname=user.getRealname();
        this.count=user.getCount();

    }
}
